<template>
  <a-tabs defaultActiveKey="1" :style="{ marginTop: '12px',height:'440px',background:'#fff' }">
    <a slot="tabBarExtraContent" @click="loadMore('A03')" style="margin-right:10px">更多</a>
    <a-tab-pane key="1">
      <span slot="tab"><a-icon type="tags" style="margin-right:5px" theme="filled"/>签约新闻</span>
      <!--展示规章制度信息-->
      <template v-if="formData.length>0">
        <a-list itemLayout="horizontal" :dataSource="formData">
          <a-list-item @click="showDetail(item)" slot="renderItem" :key="index" slot-scope="item, index" style="margin:0 10px">
            <div @click.stop="eyeClick(item)"><a-icon type="eye"  style="margin-right: 5px" />{{item.readTimes==0?'':item.readTimes}}</div>
            <a href="#" style="margin-left: 5px;color:#000000">
              <j-ellipsis :value="item.title" :length="15"/>
            </a>
            <div class="ant-list-item-content">{{item.createTime}}</div>
          </a-list-item>
        </a-list>
      </template>
      <template v-else>
        <a-empty />
      </template>
    </a-tab-pane>
  </a-tabs>
</template>

<script>
  import JEllipsis from '@/components/jeecg/JEllipsis'
  import EoaCmsArticleReaderModal from '../../cms/modules/EoaCmsArticleReaderModal'

  export default {
    name: 'EoaCmsSignNews',
    components: {
      EoaCmsArticleReaderModal,
      JEllipsis,
    },
    props: ['formData'],
    methods: {
      loadMore(type){
        this.$router.push({ path: '/modules/eoa/cms/eoaCmsArticlePortal',query:{type:type}})
      },
      showDetail(item){
        console.log("showDetail==>item", item);
        this.$router.push({ path: '/modules/eoa/cms/modules/eoaCmsArticleDetailModal',query : { item:item }})
      },
      eyeClick(item){
        this.$refs.readerModal.loadReader(item);
      },
    }
  }
</script>

<style scoped>

</style>